package com.zk.ppa.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zk.ppa.dao.po.Accout;
import com.zk.ppa.dao.repository.AccoutRepository;
import com.zk.ppa.service.HealthService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author chenxiaolong
 * @since 2021年03月21日 11:41:00
 */
@Slf4j
@Service
public class HeathServiceImpl implements HealthService {
    @Autowired
    private AccoutRepository accoutRepository;

    @Override
    public void insert() {
        log.info("insert");
        accoutRepository.save(new Accout().setAccount(15089380646L).setPassword("123456").setRole((byte)1).setName("赵冬桂").setUnit("仲恺村委会"));
    }

    @Override
    public void delete() {
        log.info("delete");
        accoutRepository.remove(new QueryWrapper<Accout>().eq(Accout.ID, 1373488444298240002L));
    }
}
